package com.general.message.notice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 消息通知详情表
 */
@TableName(value ="msg_notice_info")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NoticeInfo implements Serializable {

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 内容
     */
    private String content;

    /**
     * 菜单标识
     */
    private String menuKey;


    /**
     * 类别
     */
    private String type;

    /**
     * 接收人
     */
    private String receiveUser;

    /**
     * 发起人
     */
    private String fromUser;

    /**
     * 是否已读
     */
    private Integer hasRead = 0;

    /**
     * 消息接收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime receiveTime = LocalDateTime.now();

    /**
     * 消息读取时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime readTime;


    @TableField(exist = false)
    private String webRoute;

    @TableField(exist = false)
    private String mobileRoute;


}